<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:c="http://java.sun.com/jstl/core"
				xmlns:sec="http://www.springframework.org/security/facelets/tags">
	<head>
	</head>

    <h:form>
		<ul id="menu1" class="menu">
	    	<li>
	        	<h:commandLink action="demowelcome" value="#{msg.navBarHome}" >
	        		<f:setPropertyActionListener target="#{navController.showHome}" value="true" /> 
	            </h:commandLink>
	        </li>
	        <li>
		        <h:commandLink action="gettingStarted" value="#{msg.navBarGettingStarted}" >
		        	<f:setPropertyActionListener target="#{navController.showGettingStarted}" value="true" /> 
		        </h:commandLink>
			</li>
	        <sec:ifAllGranted roles="ACCESS_BASELINE">
		   		<li>
		   			<h:commandLink action="baseline" value="#{msg.navBarBaseline}" >
		    			<f:setPropertyActionListener target="#{navController.showBaseline}" value="true" /> 
		            </h:commandLink>
		    	</li>
	    	</sec:ifAllGranted>
	    	<sec:ifAllGranted roles="ACCESS_UPDATE">
		    	<li>
		    		<h:commandLink action="update_flow" value="#{msg.navBarUpdate}" >
		    			<f:setPropertyActionListener target="#{navController.showUpdate}" value="true" /> 
		            </h:commandLink>
		    	</li>
	    	</sec:ifAllGranted>
	        <sec:ifAllGranted roles="ACCESS_AMENDMENT_FORMS">
		        <li>
		            <h:commandLink value="#{msg.navBarAmendments}" action="demowelcome" >
		            	<f:setPropertyActionListener target="#{navController.showAmendments}" value="true" /> 
		            </h:commandLink>
		            <c:if test="#{navController.showAmendments}" >
			        <ul>
			        	<li><h:commandLink value="Adult VPM" action="#{adultVPMCrud.createSetup}" /></li>
				        <li><h:commandLink value="#{msg.navBarDeath}" action="#{deathCrud.createSetup}" /></li>
				        <li><h:commandLink value="#{msg.navBarIndividual}" action="#{individualCrud.createSetup}" /></li>
				        <li><h:commandLink value="In Migration" action="#{inMigrationCrud.createSetup}" /></li>
				        <li><h:commandLink value="#{msg.navBarLocation}" action="#{locationCrud.createSetup}" /></li>
				        <li><h:commandLink value="#{msg.navBarMembership}" action="#{membershipCrud.createSetup}" /></li>
			        	<li><h:commandLink value="NeoNatal VPM" action="#{neonatalVPMCrud.createSetup}" /></li>  
				        <li><h:commandLink value="#{msg.navBarOutMigration}" action="#{outMigrationCrud.createSetup}" /></li>
			        	<li><h:commandLink value="PostNeoNatal VPM" action="#{postneonatalVPMCrud.createSetup}" /></li> 
				        <li><h:commandLink value="#{msg.navBarPregnancyObservation}" action="#{pregnancyObservationCrud.createSetup}" /></li>
				        <li><h:commandLink value="#{msg.navBarPregOutcome}" action="#{pregnancyOutcomeCrud.createSetup}" /></li>
				        <li><h:commandLink value="Register Individual to Social Group" action="regIndivToSg_flow" /></li>
				        <li><h:commandLink value="#{msg.navBarRelationship}" action="#{relationshipCrud.createSetup}" /></li>
				        <li><h:commandLink value="#{msg.navBarResidency}" action="#{residencyCrud.createSetup}" /></li>
				        <li><h:commandLink value="#{msg.navBarSocialGroup}" action="#{socialGroupCrud.createSetup}" /></li>
				        <li><h:commandLink value="Vaccination" action="#{vaccinationCrud.createSetup}" /></li>  
				        <li><h:commandLink value="#{msg.navBarVisit}" action="#{visitCrud.createSetup}" /></li>                 
			    	</ul>
			    	</c:if>
		    	</li>
	    	</sec:ifAllGranted>
			<sec:ifAllGranted roles="ACCESS_REPORTS">
		    	<li>
		        	<h:commandLink value="#{msg.navBarReports}" action="demowelcome" >
		        		<f:setPropertyActionListener target="#{navController.showReports}" value="true" /> 
		            </h:commandLink>
		        	<c:if test="#{navController.showReports}" >
		        	<ul>
			            <li><h:commandLink value="Demographic Rates" action="#{demRatesCrud.createSetup}" /></li>
			            <li><h:commandLink value="Household Register" action="#{householdRegCrud.startHouseholdRegistration}" /></li>
			            <li><a href="#{request.contextPath}/migration-ent-reconciliation.report" target="_blank">Migration Ent Reconciliation</a></li>
			            <li><a href="#{request.contextPath}/pregnancy-observ-reconciliation.report" target="_blank">Preg Observ Reconciliation</a></li>
			        	<li><a href="#{request.contextPath}/identification-book.report" target="_blank">Identification Book</a></li>
			        </ul>
			        </c:if>
		    	</li>
	    	</sec:ifAllGranted>
	    	<sec:ifAllGranted roles="ACCESS_UTILITY_ROUTINES">
			    <li>
			        <h:commandLink value="#{msg.navBarUtilityRoutine}" action="demowelcome" >
			        	<f:setPropertyActionListener target="#{navController.showUtilities}" value="true" /> 
			        </h:commandLink>
			        <c:if test="#{navController.showUtilities}" >
		        	<ul>
		        	    <li><h:commandLink value="#{msg.navBarDataExtensions}" action="#{extensionCrud.createSetup}" /></li>
			        	<li><h:commandLink value="#{msg.navBarIndivHistory}" action="individualHistory_flow" /></li>
			        	<li><h:commandLink value="#{msg.navBarModifyGroupHead}" action="modifyHOH_flow" /></li>
			            <li><h:commandLink value="#{msg.navBarDeathGroupHead}" action="deathForHOH_flow" /></li>
			            <li><h:commandLink value="#{msg.navBarFieldWorkers}" action="#{fieldWorkerCrud.createSetup}" /></li>
			            <li><h:commandLink value="#{msg.navBarLocationHierarchy}" action="#{locationHierarchyCrud.createSetup}" /></li>
			            <li><h:commandLink value="#{msg.navBarMergeIndividual}" action="#{individualMergeCrud.createSetup}" /></li>
			            <li><h:commandLink value="#{msg.navBarRoundCodes}" action="#{roundCrud.createSetup}" /></li>
			            <li><h:commandLink value="#{msg.navBarNotes}" action="#{noteCrud.createSetup}" /></li>
			            <li><h:commandLink value="DHIS Document" action="dhisDocument_create" /></li>
			   		    <li><h:commandLink value="#{msg.navBarStudyDocument}" action="studyDocument_create" /></li>
			    		  <li>
			   		    	<h:outputLink value="#{request.contextPath}/validationRoutine">
			   		    		<h:outputText value="#{msg.validationRoutineName}" />
			   		    	</h:outputLink>
			   		    </li>
			    	</ul>
			    	</c:if>
			    </li>
		    </sec:ifAllGranted>
		    <sec:ifAllGranted roles="ACCESS_CONFIGURATION">
			    <li>
			        <h:commandLink value="#{msg.navBarConfiguration}" action="demowelcome">
			        	<f:setPropertyActionListener target="#{navController.showConfiguration}" value="true" /> 
			        </h:commandLink>
			        <c:if test="#{navController.showConfiguration}" >
		        	<ul>
		        		<li>
			   		    	<h:outputLink value="#{request.contextPath}/codes-config">
			   		    		<h:outputText value="#{msg.codeName}" />
			   		    	</h:outputLink>
			   		    </li>
			    		<li>
			   		    	<h:outputLink value="#{request.contextPath}/database-config">
			   		    		<h:outputText value="#{msg.dbName}" />
			   		    	</h:outputLink>
			   		    </li>
			   		    <li>
			   		    	<h:outputLink value="#{request.contextPath}/location-levels">
			   		    		<h:outputText value="#{msg.locationLevelsName}" />
			   		    	</h:outputLink>
			   		    </li>
			   		    <li><h:commandLink value="#{msg.navBarRoleManagement}" action="#{roleCrud.createSetup}" /></li>
			   		    <li><h:commandLink value="#{msg.navBarUserManagement}" action="#{userCrud.createSetup}" /></li>  
			   		    <li><h:commandLink value="#{msg.navBarWhitelistManagement}" action="#{whitelistCrud.createSetup}" /></li>
			    	</ul>
			    	</c:if>
			    </li>
		    </sec:ifAllGranted>
	    </ul>
    </h:form>
</ui:composition>